﻿Imports System.Drawing

Public Class PlayerCommandCenterFactory
    Public Shared Function getCommandCenterForPlayerNumber(ByVal playerNumber As Integer) As CommandCenter
        If (playerNumber < 1 Or playerNumber > 5) Then
            Throw New Exception("Programmer error: must pass in a number between 1 - 5")
        End If

        Dim commandCenter As CommandCenter = Nothing

        If (playerNumber = 1) Then
            commandCenter = New CommandCenter(New Point(378, 286))
        ElseIf (playerNumber = 2) Then
            commandCenter = New CommandCenter(New Point(64, 105))
        ElseIf (playerNumber = 3) Then
            commandCenter = New CommandCenter(New Point(637, 129))
        ElseIf (playerNumber = 4) Then
            commandCenter = New CommandCenter(New Point(652, 421))
        ElseIf (playerNumber = 5) Then
            commandCenter = New CommandCenter(New Point(73, 424))
        End If

        Return commandCenter
    End Function
End Class
